package com.example.homemate;

import com.example.homemate.service.owner.OwnerService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HomeMateApplication implements CommandLineRunner {
    private final OwnerService ownerService;

    // 修正构造函数名称，与类名保持一致
    public HomeMateApplication(OwnerService ownerService) {
        this.ownerService = ownerService;
    }

    public static void main(String[] args) {
        SpringApplication.run(HomeMateApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        // 初始化测试数据
        ownerService.initTestData();
        System.out.println("000001111110000000");
    }
}